<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/plugins/echarts/echarts.common.min.js"></script>


</head>
<body>
<div id="main" style="width: 1500px;height:650px;"></div>
<script>
    var myChart = echarts.init(document.getElementById('main'));
    var option = {
        legend: {},
        tooltip: {},
        dataset: {
            source: [
                ['product', '总消费金额', '总优惠金额', '总实收金额'],
               <#list list as l>
                ['${l.sort}', ${l.totalAmount}, ${l.totalDiscount}, ${l.totalPayAmount}]
                <#if l_index < (list?size-1)>
                    ,
                </#if>
               </#list>

            ]
        },
        xAxis: {type: 'category'},
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [
            {type: 'bar'},
            {type: 'bar'},
            {type: 'bar'}
        ]
    };
    myChart.setOption(option);
</script>
</body>
</html>